import java.util.LinkedList;
import java.util.List;

/**
 * A simple class the keeps track of a single or a group of neurons in the
 * neural network. Upon creation it instantiates the chosen amount of output
 * neurons.
 */
public class NeuronLayer {
    int numNeurons;
    List<Neuron> neurons;

    public NeuronLayer(final int numNeurons, final int numInputs) {
        super();
        this.numNeurons = numNeurons;
        createNeurons(numNeurons, numInputs);
    }

    private void createNeurons(final int numNeurons, final int numInputs) {
        neurons = new LinkedList<Neuron>();
        for (int i = 1; i <= numNeurons; i++) {
            neurons.add(new Neuron(numInputs, i));
        }
    }

    public List<Neuron> getNeurons() {
        return neurons;
    }
}
